package eop.project

class Eruption {
	Date eventDate
	Date startDate
	Date endDate
	int vei
	String agent	//caused the fatalities for an erruption
	Damage damage
	
	static belongsTo=[volcano:Volcano]
	static hasMany=[activities:Activity]                 
	
    static constraints = {
		vei(nullable:true)
		agent(nullable:true)
		eventDate(nullable:true)
		startDate(nullable:true)
		endDate(nullable:true)
		damage(nullable:true)
		volcano(nullable:false)
    }
	public String toString(){
		return "$eventDate"
	}
}
